<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        // 输出所有的水仙花数  abc = a*a*a + b*b*b + c*c*c
        //    找到所有的三位数
        for (var i = 100; i < 1000; i++) {
            var a = parseInt(i / 100);
            var b = parseInt(i % 100 / 10);
            var c = i % 10;
            if (Math.pow(a, 3) + Math.pow(b, 3) + Math.pow(c, 3) === i) {
                document.write(i + ' ');
            }
        }





    </script>

</body>

</html>